﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace NewsMine.FeedRepository
{
    public class RepositoryConfiguration
    {
        private static string rootDirectory;

        public static string RootDirectory
        {
            get
            {

                if (string.IsNullOrEmpty(rootDirectory))
                {
                    //rootDirectory = System.Configuration.ConfigurationSettings.AppSettings["rootFolder"];
                    rootDirectory = System.Configuration.ConfigurationManager.AppSettings["rootFolder"];

                    if (string.IsNullOrEmpty(rootDirectory))
                    {
                        rootDirectory = System.IO.Directory.GetCurrentDirectory();
                    }
                }


                return rootDirectory;
            }

        }


        private static  string targetConfiDataFile;
        public static string TargetConfigDataFileName
        {
            get {

                return "c:\\configData.dat";

                return Path.Combine(RepositoryConfiguration.RootDirectory, "ConfigDataTemp.dat");}
        }


    }
}
